package br.com.news.dao.util.interfaces;

import java.util.List;

import br.com.news.exception.DataException;
import br.com.news.modal.interfaces.IBaseBean;

public interface IGenericDao<T extends IBaseBean> {

	long salvar(T entity) throws DataException;
	
	void atualizar(T entity) throws DataException;
	
	long inserir(T entity) throws DataException;
	
	int deletar(T entity) throws DataException;
	
	int deletar(T entity, String where, String[] whereArgs) throws DataException;
	
	T findId(T entity) throws DataException;
	
	List<T> findAll(T entity) throws DataException;
	
	List<T> findWhere(T entity, String where, String[] whereArgs, String orderBy) throws DataException;
	
	void fechar();
	
}
